<template>
    <div class="find">
     <h1>商城</h1>
     <!-- <button @click="goDetailByProams">携带查询参数跳转到商品详情页面 </button>
     <button @click="goDetailByProams">携带查询参数和路由参数两个跳转到商品详情页面 </button>
     <button @click="goDetail"> --跳转到活动列表那里</button> -->
    </div>
</template>

<script>
    export default {
        name:"Find",

        methods:{
          goDetail(){
        this.$router.push({
          //路由名称
            name:'Detail',
        // 查询参数
        query:{id:100 ,a:2} });
      },

      //携带路由参数跳转
      goDetailByProams(){
        this.$router.push({
            name:"Detail",
            params:{
                //pid需要和路由配置的参数名一致
                pid:"A001"
            }
        })
      },
      goDetailByProamsQuery(){
        this.$router.push({
            name:"Detail",
            query:{

            },
            params:{
                //pid需要和路由配置的参数名一致
                pid:"A002",
                city:"广州"
            }
        })
      },
    }, 
    }
</script>

<style lang="less" scoped>
    
</style>